package com.jdjw.modules.buscomment.service.impl;

import com.jdjw.common.ResponseResult;
import com.jdjw.modules.buscomment.entity.BusComment;
import com.jdjw.modules.buscomment.mapper.BusCommentMapper;
import com.jdjw.modules.buscomment.service.BusCommentService;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.stereotype.Service;

import java.util.List;
import java.util.Map;

/**
 * <p>
 * 项目评价表 服务实现类
 * </p>
 *
 * @author fq
 * @since 2021-05-28
 */
@Service
public class BusCommentServiceImpl extends ServiceImpl<BusCommentMapper, BusComment> implements BusCommentService {

    @Override
    public ResponseResult resultFeedback(BusComment comment) {
        ResponseResult result = new ResponseResult();

        try{
            updateById(comment);
            result.setCode(200);
            result.setMsg("SUCCESS");
            result.setData("反馈完成");
        }
        catch (Exception e){
            e.printStackTrace();
            result.setCode(500);
            result.setMsg("ERROR");
            result.setData("请求失败");
        }
        return result;
    }

}
